package org.will.jvm;

/**
 * 运行时常量池内存异常
 * JVM Args:
 * JDK8+   -XX:MetaspaceSize=1m -XX:MaxMetaspaceSize=1m
 * JDK7-   -XX:PermSize=1m -XX:MaxPermSize=1m
 */
public class RuntimeConstatntPoolOOM {
    public static void main(String[] args){
//
        String s = "aabb";
        StringBuilder sb = new StringBuilder("aa").append("bb");
        String ss = "aabb";

        System.out.println(sb.toString() == s);
        System.out.println(s == ss);
    }
}
